//META<inuse=true>
//META<author=Squid>

//aaa

//HELP<echo=[color_white]Write to console[color_green] syntax:/echo text>
function echo(msg)
{
   base.echo(msg);
}

//HELP<join=[color_white]Show help [color_green] syntax:/help command>
function help(cmd)
{
    base.help(cmd);
}

//HELP<join=[color_white]Join in channel [color_green] syntax:/server servername>
function join(channel) 
{
   base.echo("Joining channel "+channel);
   base.join(channel);
}

//HELP<ns=[color_white]Send command to NickServer [color_green] syntax:/ns command>
function ns(engine, command)
{
  base.ns(command);
}

//HELP<cs=[color_white]Send command to ChanServer [color_green] syntax:/ns command>
function cs(engine, command)
{
  base.cs(command);
}

//HELP<server=[color_white]Connect to server [color_green] syntax:/server servername>
function server(engine, server)
{
   base.server(server, 6667)
}

//HELP<exit=[color_white]Exit from [APP_NAME] [color_green] syntax:/exit>
function exit(engine)
{
	base.exit();
}

//HELP<notice=[color_white]Send notice to user/channel[color_green] syntax:/notice channel|user message>
function notice(engine, sargs)
{
  if(util.checkArgs(sargs,2)) {
		var args = util.getArgs(sargs,2);
	    base.notice(args[0], args[1]);
   }
}

//HELP<msg=[color_white]Send private message to user [color_green] syntax:/msg user text>
function msg(engine, sargs)
{
if(util.checkArgs(sargs,2)) {
		var args = util.getArgs(sargs,2);
	    base.msg(args[0], args[1]);
   }

}